<HTML><HEAD><TITLE>lub(?SetVariable, -Glb, -Poss, -Lub)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(cardinal)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>lub(?SetVariable, -Glb, -Poss, -Lub)</H1>
Obtaining a set's lub, together with its glb and poss (lub\glb)
<DL>
<DT><EM>SetVariable</EM></DT>
<DD>A set variable.
</DD>
<DT><EM>Glb</EM></DT>
<DD>A set.
</DD>
<DT><EM>Poss</EM></DT>
<DD>A set.
</DD>
<DT><EM>Lub</EM></DT>
<DD>A set.
</DD>
</DL>
<H2>Description</H2>
Lub is unified with the (least) upper bound of SetVariable.<P>
		Glb is unified with the (greatest) lower bound of SetVariable.<P>
		Poss is unified with the set of still possible elements of SetVariable
		(i.e. its lub\glb).<P>
		If SetVariable is a set of sets and a union function attribute has been set,
		then each element of Poss comes annotated with its respective length.
<H3>Fail Conditions</H3>
Fails if Lub can not be unified with the current lub of SetVariable or
		if Glb can not be unified with the current glb of SetVariable or
		if Poss can not be unified with the current poss (lub\glb) of SetVariable.
<H3>Resatisfiable</H3>
No.
<H2>Examples</H2>
<PRE>
?- S `::[c]+[a,b], lub(S,G,P,L).
G = [c]
P = [a,b]
L = [a,b,c]

?- set(S, [],[[a,b],[b,c],[a,c],[b]],[union:[a,b,c]]), lub(S,G,P,L).
G = []
P = [[a, b] : 2, [a, c] : 2, [b] : 1, [b, c] : 2]
L = [[a, b], [a, c], [b], [b, c]]
</PRE>
<H2>See Also</H2>
<A HREF="../../lib_public/cardinal/lub-2.html">lub / 2</A>, <A HREF="../../lib_public/cardinal/glb_poss-3.html">glb_poss / 3</A>, <A HREF="../../lib_public/cardinal/glb-2.html">glb / 2</A>, <A HREF="../../lib_public/cardinal/poss-2.html">poss / 2</A>, <A HREF="../../lib_public/cardinal/domain-2.html">domain / 2</A>, <A HREF="../../lib_public/cardinal/domain-3.html">domain / 3</A>
</BODY></HTML>
